{% extends "base.html"%}
{% block title %}
	段子:)
{% endblock %}
{% block banner %}
	<div id='top-sec-nav' style='border-bottom: 2px solid rgba(216, 106, 106, 0.4);'>
		<div class='banner-nav-left' style='background:rgba(216, 106, 106, 0.4);'>
			<a href='/blog/happy/'>
				<p>那些段子:)</p>
			</a>	
		</div>
		<div class='banner-nav-lable'><p>那些只有it人才懂的段子，你是否理解n(*≧▽≦*)n</p></div>
	</div>
{% endblock %}
{% block container %}
	
	<div class="blog-view">
		<div class='blog-left' >
			<div class='notice'><p>您身边发生的段子在这里分享，把欢笑传递给更多的it孩子们:)</p></div>
			<div id='happy'>
				<form method='post' action='/blog/happy/add/'>
					<div>
						<textarea class="comment-form" cols="90" id="id_happy" maxlength="400" name="body" placeholder="...段子..." rows="3"></textarea>
					</div>
					<div>
						<div>
							<button>发布</button>
						</div>
						<div>
							{% if error %}
								<p style='color:red;'>{{ error }}</p>
							{% endif %}
						</div>
					</div>
				</form>
			</div>
			<div id='container'>
				{% for blog in blogs %}
						<div class='item'>
							<p style='color: black;'><em style='font-size:10px;color:#C3B4B4;'>{{ blog.timestamp }}</em></p><br>
							<p style='color: black;'>{{ blog.body}} </p>
						</div>
				{% endfor %}
			</div>	
		</div>
		<div class='blog-right' style='margin-top:10px; border-left:2px solid rgba(141,59,181,0.5);'>
			<div style='border-bottom: 1px solid rgba(81, 204, 49, 0.5);'><p class='fenlei-p'>旅行日志</p></div>
			<div class='new-blog'>
				{% for new in travels %}
					<a href='/blog/travel/{{ new.id }}/'><div><p>{{ new.title }}</p></div></a>
				{% endfor %}
			</div>
			<div style='border-bottom: 1px solid rgba(200, 108, 212, 0.5);'><p class='fenlei-p'>图片欣赏</p></div>
			<div id='blog-list-right-midd'>
				<ul class="blog-list-right-banner">   
					{% for pic in pics %}
					<li><a href='/blog/pic/{{pic.id}}' target='view_window'><img alt='{{pic.title}}' src="/media/{{pic.first_pic}}" style='width:100%;height:100%;'></a></li> 
					{% endfor%}
				 </ul> 
			</div>
			<div style='border-bottom: 1px solid rgba(19, 196, 216, 0.5);'><p class='fenlei-p'>最新文章</p></div>
			<div class='new-blog'>
				{% for new in newblogs %}
					<a href='/blog/article/{{ new.id }}/'><div><p>{{ new.title }}</p></div></a>
				{% endfor %}
			</div>
			
		</div>
	</div>
{% endblock %}